package com.yan.demo02;


import com.yan.Server;

/**
 * @author yanheng
 * @data 2020/1/19 10:33
 */
public class ProxyServer implements Server {

    private Server server;

    public ProxyServer(Server server){
        this.server = server;
    }

    @Override
    public void downloadResource() {
        System.out.println("connect to network");
        server.downloadResource();
        System.out.println("close network");
    }
}
